package com.eorchis.module.reminduserlink.domain;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import com.eorchis.core.basedao.entity.impl.AbstractBaseEntity;
import org.codehaus.jackson.annotate.JsonIgnoreProperties;
import org.hibernate.annotations.GenericGenerator;
import com.eorchis.core.basedao.entity.IBaseEntity;
import com.eorchis.module.remind.domain.Remind;

/**
 * Title: RemindUserLink<br>
 * Description: 提醒用户关联表实体对象<br>
 * Company: GoldGov<br>
 * Copyright @ 2012 GoldGov .All rights reserved.<br>
 * @author RongSL
 * @createDate 2016-05-06
 * @version $Revision$
 */
/**
 * @author Lenovo
 *
 */
@Entity
@Table(name = "REMIND_USER_LINK")
@JsonIgnoreProperties(value={"remind"})
public class RemindUserLink extends AbstractBaseEntity implements IBaseEntity {
	private static final long serialVersionUID = 1L;

	public final static Integer LOOK_STATE_YES=1;	//已查看
	public final static Integer LOOK_STATE_NO=2;		//未查看
	public final static Integer SEND_PERMIT_YES=1;//允许再次发送提醒
	public final static Integer SEND_PERMIT_NO=2;//不允许再次发送提醒
	
	private String remindUserId;//提醒用户ID
	private Integer lookState;//查看状态
	private String remindValue;//提醒表内容
	private Remind remind;//提醒表ID
	private String replyUserId;//提醒接收人ID
	private String remindClassIdCode;//提醒编码
	private Integer sendPermit;//是否允许再次发送

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(name="REMIND_USER_ID")
	/**
	 * 设置提醒用户ID
	 */		
	public String getRemindUserId() {
		return remindUserId;
	}
	/**
	 * 获取提醒用户ID
	 */		
	public void setRemindUserId(String remindUserId) {
		this.remindUserId = remindUserId;
	}
	@Column(name="LOOK_STATE")
	/**
	 * 设置查看状态
	 */		
	public Integer getLookState() {
		return lookState;
	}
	/**
	 * 获取查看状态
	 */		
	public void setLookState(Integer lookState) {
		this.lookState = lookState;
	}
	@Column(name="REMIND_VALUE")
	/**
	 * 设置提醒表内容
	 */		
	public String getRemindValue() {
		return remindValue;
	}
	/**
	 * 获取提醒表内容
	 */		
	public void setRemindValue(String remindValue) {
		this.remindValue = remindValue;
	}
	
	@ManyToOne(cascade = CascadeType.ALL, optional = true)
	@JoinColumn(name="remind_id", referencedColumnName="remind_id")
	/**
	 * 设置提醒表ID
	 */		
	public Remind getRemind() {
		return remind;
	}
	/**
	 * 获取提醒表ID
	 */		
	public void setRemind(Remind remind) {
		this.remind = remind;
	}

	/**
	 * 记录日志使用
	 */
	public String toString() {
		return "提醒用户ID======>" + getRemindUserId()+"\n查看状态======>" + getLookState()+"\n提醒表内容======>" + getRemindValue();
	}
	
	@Column(name="REPLY_USER_ID")
	public String getReplyUserId() {
		return replyUserId;
	}
	public void setReplyUserId(String replyUserId) {
		this.replyUserId = replyUserId;
	}
	
	@Column(name="send_Permit")
	public Integer getSendPermit() {
		return sendPermit;
	}
	public void setSendPermit(Integer sendPermit) {
		this.sendPermit = sendPermit;
	}
	
	@Column(name="remind_ClassIdCode")
	public String getRemindClassIdCode() {
		return remindClassIdCode;
	}
	public void setRemindClassIdCode(String remindClassIdCode) {
		this.remindClassIdCode = remindClassIdCode;
	}
	
}
